package com.fivestar.finance.app.core;

/**
 * 全局异常类
 *
 * @author Derek.Kidd
 * @time 2016/4/18 16:12
 */
public class FFException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private int errorCode;
    private String errorMessage;

    /**
     * <默认构造函数>
     */
    public FFException(int errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    @Override
    public String toString() {
        return "errorCode: " + errorCode + "   errorMessage" + errorMessage;
    }
}